<%@ page language="java"  pageEncoding="UTF-8"%>
<div class="panel">
  <div class="panel-heading">
   	 查询区域
  </div>
  <div class="panel-body">
    <div class="row">
    	<div class="col-md-4">
    		<div class="input-group">
			  <span class="input-group-addon">地区编码</span>
			  <input type="text" id="queryAreaCode" name="queryAreaCode" class="form-control" placeholder="">
			</div>
    	</div>
    	<div class="col-md-4">
    		<div class="input-group">
			  <span class="input-group-addon">地区名称</span>
			  <input type="text" id="queryAreaNameLike" name="queryAreaNameLike" class="form-control" placeholder="">
			</div>
    	</div>
    	<div class="col-md-4">
    		<button class="btn btn-success" type="button" id="searchBtn"><i class="icon-search"></i>搜索</button>
    	</div>
    </div>
  </div>
</div>
<div class="datagrid">
  <div class="search-box">
  	<button class="btn btn-success " type="button"
  	  data-toggle="modal" data-target="#addModal" id="addBtn"><i class="icon-plus"></i>新增</button>
  	  &nbsp;&nbsp;&nbsp;&nbsp;
  	<button class="btn btn-info "  type="button" data-toggle="modal" data-target="#updateModal" id="updateBtn"><i class="icon icon-edit"></i>修改</button>
    	&nbsp;&nbsp;&nbsp;&nbsp;
    <button class="btn btn-danger " type="button" id="deleteBtn"><i class="icon icon-trash"></i>删除</button>
    	&nbsp;&nbsp;&nbsp;&nbsp;
    <button class="btn " type="button" id="detailBtn"><i class="icon icon-info"></i>详情</button>
  </div>
  <div class="datagrid-container" id="listDataGrid"></div>
  <div id="listPager" class="pager"  data-ride="pager" ></div>
</div>
<!-- 添加页面 -->
<div class="modal fade" id="addModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
        <h4 class="modal-title">新增用户</h4>
      </div>
      <form id="addForm">
      <div class="modal-body">
        <div class="row">
	    	<div class="col-md-6">
	    		<div class="input-group">
				  <span class="input-group-addon">地区编码</span>
				  <input type="text" id="addAreaCode" name="addAreaCode" class="form-control" >
				</div>
	    	</div>
	    	<div class="col-md-6">
	    		<div class="input-group">
				  <span class="input-group-addon">地区名称</span>
				  <input type="text" id="addAreaName" name="addAreaName" class="form-control" >
				</div>
	    	</div>
	    </div>
	 	<div style="margin-top:10px;"></div>
        <div class="row">
	    	<div class="col-md-6">
	    		<div class="input-group">
				  <span class="input-group-addon">上级地区</span>
				  <select  id="addAreaParentCode" name="addAreaParentCode" class="form-control">
				  	<option value="">请选择</option>
				  </select>
				</div>
	    	</div>
	    	<div class="col-md-6">
	    		<div class="input-group">
				  <span class="input-group-addon">排序码</span>
				  <input type="text" id="addSortNo" name="addSortNo" class="form-control">
				</div>
	    	</div>
	    </div>
	 	<div style="margin-top:10px;"></div>
        <div class="row">
	    	<div class="col-md-6">
	    		<div class="input-group">
      			<input type="hidden" name="action" value="add"/>
				  <span class="input-group-addon">地区描述</span>
				  <textarea  id="addDescription" name="addDescription" 
				  	cols="60" rows="4"
				  class="form-control"></textarea>
				</div>
	    	</div>
	    </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary"  id="addSave">保存</button>
      </div>
      </form>
    </div>
  </div>
</div>
<!-- 修改 -->
<!-- 对话框触发按钮 -->
<div class="modal fade" id="updateModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">关闭</span></button>
        <h4 class="modal-title">修改地区</h4>
      </div>
      <form id="updateForm">
      <div class="modal-body">
        <div class="row">
	 		<div class="col-md-6">
	 			<div class="input-group ">
					  <span class="input-group-addon">地区编码<font color="red">*</font></span>
					  <input type="text" class="form-control" id="updateAreaCode" name="updateAreaCode">
				</div>
	 		</div>
	 		<div class="col-md-6">
	 			<div class="input-group ">
			 	  <span class="input-group-addon">地区名称<font color="red">*</font></span>
			 	  <input type="text" class="form-control" id="updateAreaName" name="updateAreaName">
				</div>
	 		</div>
	 	</div>
	 	<div style="margin-top:10px;"></div>
        <div class="row">
	 		<div class="col-md-6">
	 			<div class="input-group ">
					  <span class="input-group-addon">所属地区<font color="red">*</font></span>
					  <select class="form-control" id="updateAreaParentCode" name="updateAreaParentCode">
					    <option value="0">请选择</option>
					  </select>
				</div>
	 		</div>
	 		<div class="col-md-6">
	 			<div class="input-group ">
			 	  <span class="input-group-addon">排序码值<font color="red">*</font></span>
			 	  <input type="text" class="form-control" id="updateSortNo" name="updateSortNo" maxlength="4">
			 	  <input type="hidden" id="action" name="action" value="update">
				</div>
	 		</div>
	 	</div>
	 	<div style="margin-top:10px;"></div>
        <div class="row">
	 		<div class="col-md-12">
	 			<div class="input-group ">
					  <span class="input-group-addon">地区描述</span>
					  <textarea rows="5" cols="60" class="form-control"
					  id="updateDescription" name="updateDescription"></textarea>
				</div>
	 		</div>
	 	</div>
      </div>
      <div class="modal-footer">
      	<input type="hidden" id="updateAreaId" name="updateAreaId" />
        <button type="button" class="btn btn-default " data-dismiss="modal">关闭</button>
        <button type="submit" class="btn btn-primary"  id="updateSave">保存</button>
      </div>
       </form>
    </div>
  </div>
</div>

<script type="text/javascript" src="${pageContext.request.contextPath}/js/jquery.validate.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/localization/messages_zh.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/area.js?ver=1324"></script>
<script>
</script>